<?php
namespace core;


class format
{
    public static function res_error($code, $mess)
    {
        echo json_encode(array(
            'code' => -1,
            'mess' => urlencode('您的请求未能成功'),
            'datetime' => time(),
            'data' => array(
                'code' => $code,
                'mess' => urlencode($mess)
            )
        ));
    }
}